<template>
  <ul class='condition-list box-size'>
    <li v-for="(item,index) in getListData">
      <ul class="car-one">
        <li>
          <img class="fl" :src="imgs.cars.info" alt="">
          <div>
            <p class="title"><span>车辆信息</span><span class="fr" @click="seeDetail(0,item)">查看详情</span></p>
            <p><span>车主：</span><span class="color999">{{item.carOwner}}</span></p>
            <p><span>车牌号：</span><span class="color999">{{item.carNum}}</span></p>
          </div>
        </li>
        <li>
          <img class="fl" :src="imgs.cars.check" alt="">
          <div>
            <p class="title"><span>检测报告</span><span class="fr" @click="seeDetail(1,item)">查看详情</span></p>
            <p><span>专项类别：</span><span class="color999">{{item.checkType}}</span></p>
            <p><span>检测得分：</span><span class="color999">{{item.score?(item.score+'分'):"暂无"}}</span></p>
          </div>
        </li>
        <li>
          <img class="fl" :src="imgs.cars.record" alt="">
          <div>
            <p class="title"><span>服务记录</span><span class="fr" @click="seeDetail(2,item)">查看详情</span></p>
            <p style="margin-top:8px;"><span>往期检测记录/往期维修记录</span></p>
          </div>
        </li>
      </ul>
    </li>
  </ul>
</template>
<script>

export default {
  props:["listData"],
  components: {},
  name: "",
  data() {
    return {
      imgs:{
        cars:{
          info:require('../../../../assets/img/hpmepage/condition/1.png'),
          check:require('../../../../assets/img/hpmepage/condition/2.png'),
          record:require('../../../../assets/img/hpmepage/condition/3.png')
        }
      }
    };
  },
  computed:{
    getListData(){

      return this.listData||[]
    }
  },
  methods: {
    seeDetail(index,item){
      var routerA=["/condition/carinfo","/condition/checkinfo","/condition/serveinfo"]

      sessionStorage.setItem("detailId",item.id)

      this.$router.push(routerA[index])
    }
  },
  created() {}
};
</script>
<style lang="scss" scoped>
.condition-list {
  height: 100%;
  background-color: #F2F2F2;
  overflow: auto;
  padding: 15px;
  
  .car-one{
    box-shadow: 0px 0px 5px 1px #ccc;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;

    >li{
      padding: 10px 15px;
      background-color: #fff;
      margin-bottom: 10px;
      min-height: 92px;
      border-radius: 5px;
      border: 1px solid #e0e0e0;
      box-sizing: border-box;

      img{
        width: 70px;
        height: 70px;
      }
      div{
        margin-left: 85px;

        p{
          font-size: 14px;
          margin-top: 5px;
          color: #333;

          .fr{
            width: 50px;
            font-size: 12px;
            color: #fff;
            height: 20px;
            line-height: 20px;
            background: linear-gradient(left,#FF6613,#FFA200);
            background: -webkit-gradient(linear, left bottom, right top, from(#FF6613), to(#FFA200));
            
            border-radius: 20px;
            text-align: center;
            padding: 2px 5px;
          }
        }
        .title{
          font-size: 16px;
          margin-bottom: 8px;
          margin-top: 0;
        }
      }
    }
    li:nth-last-child(1){
      margin-bottom: 0;
    }
  }
}
.color999{
  color: #999;
}
</style>